<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-complaint-edit" th:object="${complaint}">
            <input id="complaintId" name="complaintId" th:field="*{complaintId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">被投诉商家ID：</label>
				<div class="col-sm-8">
					<select id="businessinfoId" name="businessinfoId" class="form-control">
						<option th:each="bussInfo:${businessInfos}" th:value="${bussInfo.businessinfoId}" th:text="${bussInfo.businessinfoName}" th:selected="${bussInfo.flag}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉概要：</label>
				<div class="col-sm-8">
					<input id="resumes" name="resumes" th:field="*{resumes}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉内容详情：</label>
				<div class="col-sm-8">
					<input id="complaintContext" name="complaintContext" th:field="*{complaintContext}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉者ID：</label>
				<div class="col-sm-8">
					<input id="huiyuanId" name="huiyuanId" th:field="*{huiyuanId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉者电话：</label>
				<div class="col-sm-8">
					<input id="telphone" name="telphone" th:field="*{telphone}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉时间：</label>
				<div class="col-sm-8">
					<input id="complaintTime" name="complaintTime" th:field="*{complaintTime}" class="time-input" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">投诉类型ID：</label>
				<div class="col-sm-8">
					<select id="complaintTypeId" name="complaintTypeId" class="form-control">
						<option th:each="complaintType:${complaintTypes}" th:value="${complaintType.complainttypeId}" th:text="${complaintType.businesstypeName}" th:selected="${complaintType.flag}"></option>
					</select>

				</div>
			</div>

		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/complaint";
		$("#form-complaint-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-complaint-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
